﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace MobileShop
{
    public partial class AboutUs : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                PageMap = string.Format("About Us[{0}]", this.ResolveUrl("~/AboutUs.aspx"));
                string fileName = "Profile";
                if (string.IsNullOrEmpty(fileName))
                    return;
                fileName = fileName.Replace("..", "").Replace("~", "");
                fileName = Server.MapPath(string.Format("~/StaticPages/{0}.txt", fileName));
                
                if (File.Exists(fileName))
                {
                    litContent.Text = File.ReadAllText(fileName);
                }
                else
                {
                    litContent.Text = "<div >The content you are looking for is not available right now. Please contact administrator.</div>";
                }
            }
        }
    }
}